#pragma once
#include "stdafx.h"


class CGameManager
{
public:
	CGameManager(HWND hWnd, HINSTANCE hInstance);
	~CGameManager(void);
	void Initialize();
	void Erase();
	WPARAM RunGame();
	bool AnimateNextFrame(int desiredFrameRate);
	

private:
	CSnakeFood _foodApple;
	CSnakeFood _foodBanana;
	CSnakeFood _foodOrange;
	CSnakeFood _foodCherries;
	CSnakeFood _foodGrapes;
	CScoreBoard _scoreBoard;
	HBITMAP _hbmpFood;
	POINT _ptFoodLocation;
	CGraphics _graphics;
	HWND _hWnd;					// handle to the main window
	HINSTANCE _hInstance;		// instance of the application
	CSnake _tile;
	CGameMenu _menu;
	
	void RenderScene();
	float _lastRender;			// the last time the scene was rendered
	void PlantSomeFood(RECT *pPlayableRect);
	void EraseFood();
	void EraseBack();
	bool AreTheSame(RECT *pRect1, RECT *pRect2);
	bool CheckForFood();
	bool _bDrawMenu;
	int _nDifficulty;
};
